<?php
class Helper {
   
    public static function Children_categories_left_menu(){
	
    }
    public static function GetHeaderHTML($title = 'dataprint'){
	$html = '<head>
	<title>'.$title.'</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
	    <link rel="stylesheet" type="text/css" href="'.Yii::app()->request->baseUrl.'/css/main_new.css" />
	    <script type="text/javascript" src="'.Yii::app()->request->baseUrl.'/js/jquery1.10.2.js"></script>
	    <script type="text/javascript" src="'.Yii::app()->request->baseUrl.'/js/jquery.cycle.lite.js"></script>
	    <script type="text/javascript" src="'.Yii::app()->request->baseUrl.'/js/main.js"></script>
	    <script type="text/javascript" src="'.Yii::app()->request->baseUrl.'/js/ui/ui/jquery-ui.js"></script>
	</head>'; 
	return $html;
    }
    
    public static function get_img_category_temp(){
	return '<img src="/images/temp/'.rand(1, 3).'.jpg">';
    }
    
    public static function get_pagination($pages){
	Yii::app()->controller->widget('CLinkPager', array(
	'pages' => $pages,
	));
    }
    
    public static function replace_url($str = ''){
	$result = preg_replace('/[-\(\)\/\\\]/'," ",$str);
	$result = preg_replace('/\s{2,}/'," ",$result);
	return $result;
    }
}
?>
